﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using MediaClient.QHMediaSercie;

namespace MediaClient.Common
{
    public class ServiceProxy
    {
        MediaServiceClient mediaServiceProxy = null;
        public ServiceProxy()
        {
            mediaServiceProxy = new MediaServiceClient();
            mediaServiceProxy.Open();
        }

        public string GetDiscBarcode()
        {
            try
            {
                return mediaServiceProxy.GetDiscBarcode();
                
            }
            catch (Exception myE)
            {
                throw myE;
            }
        }

        public OperateMessage PositionShelf(string shelfSerialNumber,short rowIndex, short colunmIndex,ServiceMessage operate)
        {
            try
            {
                return mediaServiceProxy.PositionOfflineShelf(shelfSerialNumber, rowIndex, colunmIndex, operate);
            }
            catch (Exception myE)
            {
                throw myE;
            }
        }
    }
}
